<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><%--jstl을 쓰기 위해 사용 --%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %><%--숫자 포맷을 사용하기 위해 사용 --%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"  prefix="fn"%><%--함수들을 이용하기 위해 사용 --%>
<%@ taglib prefix="c-rt" uri="http://java.sun.com/jstl/core_rt" %>  <%-- ie버전 확인에 쓰기 위해 씀 --%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<!--<script type="text/javascript" src="script/sms_riskI_script.js"></script>-->
</head>
<body>
<div class="box">
      		<h4 class="white">SOA정립</h4>
        <div class="box-container1">     		
        	<table class="table-long">
      			<tfoot>
      				<tr>
      					<td>
      					<div class="align-left"><a href="#" class="button1 firstButton"><span style="font-size: small; font-weight:normal;">전체 : ${fn:length(list)}</span></a></div>
      					<div class="align-right"><!--select class="form-select"><option value="option1">Bulk Options</option>
      					<option value="option2">Delete All</option></select-->
      					<a href="riskIAction.do?mode=exmsoa&searchText=${param.searchText }" class="button"><span>엑셀</span></a>
      					<a href="#" class="button" onclick="javascript: msoa_SL_insert()"><span>저장</span></a>
      					<a href="#" class="button" onclick="javascript: riskIDelete()"><span>삭제</span></a>
      					</div>
      					</td>
      				</tr>
      				<tr><td class="spaceLine"></td></tr>
      			</tfoot>
      		</table>
      		<form name="riskIDelForm" action="riskIAction.do" method="post">
        	<input type="hidden" name="mode" id="mode" value="msoa_delete"></input>
        	<input type="hidden" name="pro_id" id="pro_id" value="${sessionScope.lastProId }"></input>
      		<table class="table-long">
      			<colgroup>
      				<c-rt:choose>
					<c-rt:when test="${isMSIE67}">
						<col width="33px"/>
						<col width="48px"/>
						<col width="48px"/>
						<col width="48px"/>
						<col width="48px"/>
						<col width="72px"/>
						<col width="48px"/>
						<col width="72px"/>
						<col width="23px"/>
						<col width="23px"/>
						<col width="37px"/>
						<col width="28px"/>
						<col width="78px"/>
						<col/>
						<col width="15px"/>
					</c-rt:when>
					<c-rt:otherwise>
						<col width="40px"/>
						<col width="50px"/>
						<col width="50px"/>
						<col width="70px"/>
						<col width="55px"/>
						<col width="70px"/>
						<col width="55px"/>
						<col width="70px"/>
						<col width="25px"/>
						<col width="25px"/>
						<col width="40px"/>
						<col width="25px"/>
						<col width="80px"/>
						<col/>
						<col width="15px"/>
					</c-rt:otherwise>
				</c-rt:choose>
				</colgroup>
      			<thead>
      				<tr>
      					<td class="col-chk " rowspan="2"><input type='checkbox' name='checkAll' onclick="javascript: selectAll()" class="chkCursor"></input></td>
      					<td class="col-rowspanMid" rowspan="2">통제영역</td>
      					<td class="col-rowspanMid" rowspan="2">통제항목</td>
      					<td class="col-rowspanMid" rowspan="2">통제<br/>세부항목</td>
      					<td class="col-rowspanMid" rowspan="2">적용여부</td>
      					<td class="col-rowspanMid" rowspan="2">적용현황상세</td>
      					<td class="col-rowspanMid" rowspan="2">적용계획</td>
      					<td class="col-rowspanMid" rowspan="2">적용계획상세</td>
      					<td colspan="4" class="col-alignCenter">통제선정사유</td>
      					<td class="col-rowspanMid" rowspan="2">관련제도/<br/>계획/장비/도구</td>
      					<td class="col-rowspanMid" rowspan="2">완료</td>
      					<td rowspan="2"></td>
      				</tr>
      				<tr>
      					<td>LR</td>
      					<td>CO</td>
      					<td>BR/BP</td>
      					<td>RRA</td>
      				</tr>
      			</thead>
      		</table>
      		<div class="scrollDIV">
   			<table class="table-long">
      			<colgroup>
      				<c-rt:choose>
					<c-rt:when test="${isMSIE67}">
						<col width="33px"/>
						<col width="48px"/>
						<col width="48px"/>
						<col width="48px"/>
						<col width="48px"/>
						<col width="72px"/>
						<col width="48px"/>
						<col width="72px"/>
						<col width="23px"/>
						<col width="23px"/>
						<col width="37px"/>
						<col width="23px"/>
						<col width="78px"/>
						<col/>
						<col width="15px"/>
					</c-rt:when>
					<c-rt:otherwise>
						<col width="40px"/>
						<col width="50px"/>
						<col width="50px"/>
						<col width="70px"/>
						<col width="55px"/>
						<col width="70px"/>
						<col width="55px"/>
						<col width="70px"/>
						<col width="25px"/>
						<col width="25px"/>
						<col width="40px"/>
						<col width="25px"/>
						<col width="80px"/>
						<col/>
						<col width="15px"/>
					</c-rt:otherwise>
				</c-rt:choose>
				</colgroup>
				<tbody>
					<c:choose>
                    	<c:when test="${fn:length(list)!= 0}">
                       	<c:forEach var="list" items="${requestScope.list}" varStatus="status">
                       		 <tr <c:if test="${status.index%2==0 }">class="odd"</c:if> onmouseover="ChangeBackground(this,'over','${status.index}');" onmouseout="ChangeBackground(this,'out','${status.index}');">
                       			<td class="col-chk">
                       			<%--tsoa에 저장 유무 판단 --%>
               						<input type="checkbox" name="check" <c:forEach var="flagList" items="${requestScope.flagList}" varStatus="status"><c:if test="${flagList.ts_cd1==list.ts_cd1 && flagList.ts_cd2==list.ts_cd2 && flagList.ts_cd3==list.ts_cd3 && flagList.ts_cd4==list.ts_cd4}">id="notInsert${status.index+1 }"</c:if></c:forEach>  class="chkCursor" value="${list.ts_cd1 }${list.ts_cd2 }${list.ts_cd3 }${list.ts_cd4 }"></input>
                       			</td>
                       			<td>
                    				<%--<div class="ellipsis"  style="width:100%;" title=""></div>--%>
                    				<div class="ellipsis"  style="width:100%;"><a href="riskIAction.do?mode=msoa_updatePage&tsAll=${list.ts_cd1 }${list.ts_cd2 }${list.ts_cd3 }${list.ts_cd4 }"class="nor ellipsis" title='${list.ts_nm2}'><c:forTokens var="token" items="${list.ts_nm2}" delims="(" begin="1">(${token}</c:forTokens></a></div> 
                    			</td>
                    			<td>
                    				<div class="ellipsis"  style="width:100%;"><a href="riskIAction.do?mode=msoa_updatePage&tsAll=${list.ts_cd1 }${list.ts_cd2 }${list.ts_cd3 }${list.ts_cd4 }"class="nor ellipsis" title='${list.ts_nm3}'><c:forTokens var="token" items="${list.ts_nm3}" delims="(" begin="1">(${token}</c:forTokens></a></div>
                    			</td>
                    			<td>
                    				<div class="ellipsis"  style="width:100%;"><a href="riskIAction.do?mode=msoa_updatePage&tsAll=${list.ts_cd1 }${list.ts_cd2 }${list.ts_cd3 }${list.ts_cd4 }"class="nor ellipsis" title='${list.ts_nm4}'><c:forTokens var="token" items="${list.ts_nm4}" delims="(" begin="1">(${token}</c:forTokens></a></div>
                    			</td>
                    			<td>
                    				<div title="${list.apply_yn }">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${list.apply_yn }</div>
                    			</td>
                    			<td>
                    				<div class="ellipsis"  style="width:100%;" title="${list.apply_detail }">${list.apply_detail }</div>
                    			</td>
                    			<td>
                    				<div title="${list.ap_yn }">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${list.ap_yn }</div>
                    			</td>
                    			<td>
                    				<div class="ellipsis"  style="width:100%;" title="${list.ap_detail }">${list.ap_detail }</div>
                    			</td>
                    			<td>
                    				<c:choose>
	                    				<c:when test="${list.lr==1 }">
	                    					<img src="img/chkok.gif"></img>
	                    				</c:when>
	                    				<c:otherwise>
	                    					<img src="img/chkno.gif"></img>
	                    				</c:otherwise>
                    				</c:choose>
                    			</td>
                    			<td>
                    				<c:choose>
	                    				<c:when test="${list.co==1 }">
	                    					<img src="img/chkok.gif"></img>
	                    				</c:when>
	                    				<c:otherwise>
	                    					<img src="img/chkno.gif"></img>
	                    				</c:otherwise>
	                    			</c:choose>
                    			</td>
                    			<td>
                    				<c:choose>
	                    				<c:when test="${list.brbp==1 }">
	                    					&nbsp;&nbsp;<img src="img/chkok.gif"></img>
	                    				</c:when>
	                    				<c:otherwise>
	                    					&nbsp;&nbsp;<img src="img/chkno.gif"></img>
	                    				</c:otherwise>
                    				</c:choose>
                    			</td>
                    			<td>
                    				<c:choose>
	                    				<c:when test="${list.rra==1 }">
	                    					<img src="img/chkok.gif"></img>
	                    				</c:when>
	                    				<c:otherwise>
	                    					<img src="img/chkno.gif"></img>
	                    				</c:otherwise>
                    				</c:choose>
                    			</td>
                    			<td>
	                   				<div class="ellipsis"  style="width:100%;" title="${list.connect_sys }">${list.connect_sys }</div>
	                   			</td>
	                   			<td>
	                   			<%--tsoa에 저장 유무 판단 --%>
	                   				<c:forEach var="flagList" items="${requestScope.flagList}" varStatus="status">
	                   					<c:if test="${flagList.ts_cd1==list.ts_cd1 && flagList.ts_cd2==list.ts_cd2 && flagList.ts_cd3==list.ts_cd3 && flagList.ts_cd4==list.ts_cd4}">
	                   						<a href="#" class="button1" style="margin: 0"><span>완료</span></a>
	                   					</c:if>
	                   				</c:forEach>
	                   			</td>
	                   			<td></td>
                       		</tr>
                       	</c:forEach>
                       	</c:when>
                       	<c:otherwise>
                    		<tr class="odd">
								<td colspan="14"  class="noDataTD">-데이터가 없습니다-</td>
							</tr>
                    	</c:otherwise>
                  	</c:choose>
				</tbody>
			</table>
   			</div>
      		</form>
      	</div><!-- end of div.box-container1 -->
      	</div> <!-- end of div.box -->
</body>
</html>